﻿<Application
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:System="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d"
	x:Class="VkControlSyles.App">
	<Application.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="VkComboboxStyle.xaml"/>
				<ResourceDictionary Source="VkScrollBar.xaml"/>
				<ResourceDictionary Source="VkListbox.xaml"/>
				<ResourceDictionary Source="VkScrollViewer.xaml"/>
			</ResourceDictionary.MergedDictionaries>
			<!-- Resources scoped at the Application level should be defined here. -->
			<Style x:Key="VkButtonStyleBlue" TargetType="Button">
				<Setter Property="Background" Value="{x:Null}"/>
				<Setter Property="Foreground" Value="White"/>
				<Setter Property="Padding" Value="3"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="BorderBrush" Value="#FF3B6798"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="Button">
							<Grid>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal">
											<Storyboard>
												<ColorAnimation Duration="0" To="#FF6D8FB3" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundGradient"/>
												<ColorAnimation Duration="0" To="#FF7E9CBC" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectTop"/>
												<ColorAnimation Duration="0" To="#FF5C82AB" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectLeft"/>
												<ColorAnimation Duration="0" To="#FF5C82AB" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectRight"/>
												<ColorAnimation Duration="0" To="#FF5C82AB" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectBottom"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="MouseOver">
											<Storyboard>
												<ColorAnimation Duration="0" To="#FF84A1BF" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundGradient"/>
												<ColorAnimation Duration="0" To="#FF92ACC7" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectTop"/>
												<ColorAnimation Duration="0" To="#FF7293B7" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectLeft"/>
												<ColorAnimation Duration="0" To="#FF7293B7" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectRight"/>
												<ColorAnimation Duration="0" To="#FF7293B7" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectBottom"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Pressed">
											<Storyboard>
												<!--
											<ColorAnimation Duration="0" To="#FF6DBDD1" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
											-->
												<ColorAnimation Duration="0" To="#FF6688AD" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundGradient"/>
												<ColorAnimation Duration="0" To="#FF51769E" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectTop"/>
												<ColorAnimation Duration="0" To="#FF51769E" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectLeft"/>
												<ColorAnimation Duration="0" To="#FF51769E" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectRight"/>
												<ColorAnimation Duration="0" To="#FF7495B8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectBottom"/>
												<!--
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
											-->
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Disabled">
											<Storyboard>
												<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<!--
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
											-->
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="#FFB1B1B1">
									<Grid Background="{TemplateBinding Background}" Margin="1">
										<!--<Border x:Name="BackgroundAnimation" Background="#FF448DCA" Opacity="0"/> -->
										<Rectangle x:Name="BackgroundGradient" Fill="#FF6688AD"/>
										<Rectangle x:Name="RectTop" Height="1" Fill="#FF7E9CBC" Margin="-1,-1,-1,0" VerticalAlignment="Top" />
										<Rectangle x:Name="RectLeft" Fill="#FF5C82AB" Margin="-1,0,0,-1" HorizontalAlignment="Left" Width="1" />
										<Rectangle x:Name="RectRight" Fill="#FF5C82AB" Margin="0,0,-1,-1" HorizontalAlignment="Right" Width="1" />
										<Rectangle x:Name="RectBottom" Height="1" Fill="#FF5C82AB" Margin="0,0,0,-1" VerticalAlignment="Bottom" />
									</Grid>
								</Border>
								<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
								<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
								<!--
							<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#FF6DBDD1" StrokeThickness="1"/>
							-->
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
		
			<Style x:Key="VkButtonStyleGray" TargetType="Button">
				<Setter Property="Background" Value="{x:Null}"/>
				<Setter Property="Foreground" Value="Black"/>
				<Setter Property="Padding" Value="3"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="BorderBrush" Value="#FFB8B8B8"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="Button">
							<Grid>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal">
											<Storyboard>
												<ColorAnimation Duration="0" To="#FFEAEAEA" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundGradient"/>
												<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectTop"/>
												<ColorAnimation Duration="0" To="#FFF4F4F4" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectLeft"/>
												<ColorAnimation Duration="0" To="#FFF4F4F4" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectRight"/>
												<ColorAnimation Duration="0" To="#FFDFDFDF" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectBottom"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="MouseOver">
											<Storyboard>
												<ColorAnimation Duration="0" To="#FFF7F7F7" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundGradient"/>
												<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectTop"/>
												<ColorAnimation Duration="0" To="#FFF4F4F4" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectLeft"/>
												<ColorAnimation Duration="0" To="#FFF4F4F4" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectRight"/>
												<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectBottom"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Pressed">
											<Storyboard>
												<!--
											<ColorAnimation Duration="0" To="#FF6DBDD1" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
											-->
												<ColorAnimation Duration="0" To="#FFE4E4E4" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundGradient"/>
												<ColorAnimation Duration="0" To="#FFCCCCCC" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectTop"/>
												<ColorAnimation Duration="0" To="#FFCBCBCB" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectLeft"/>
												<ColorAnimation Duration="0" To="#FFCBCBCB" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectRight"/>
												<ColorAnimation Duration="0" To="#FFE8E8E8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="RectBottom"/>
												<!--
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
											-->
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Disabled">
											<Storyboard>
												<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<!--
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
											-->
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
									<Grid Background="{TemplateBinding Background}" Margin="1">
										<!--<Border x:Name="BackgroundAnimation" Background="#FF448DCA" Opacity="0"/> -->
										<Rectangle x:Name="BackgroundGradient" Fill="#FFF7F7F7"/>
										<Rectangle x:Name="RectTop" Height="1" Fill="White" Margin="-1,-1,-1,0" VerticalAlignment="Top" />
										<Rectangle x:Name="RectLeft" Fill="#FFF4F4F4" Margin="-1,0,0,-1" HorizontalAlignment="Left" Width="1" />
										<Rectangle x:Name="RectRight" Fill="#FFF4F4F4" Margin="0,0,-1,-1" HorizontalAlignment="Right" Width="1" />
										<Rectangle x:Name="RectBottom" Height="1" Fill="#FFDFDFDF" Margin="0,0,0,-1" VerticalAlignment="Bottom" />
									</Grid>
								</Border>
								<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
								<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
								<!--
							<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#FF6DBDD1" StrokeThickness="1"/>
							-->
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<ControlTemplate x:Key="ValidationToolTipTemplate">
				<Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
					<Grid.RenderTransform>
						<TranslateTransform x:Name="xform" X="-25"/>
					</Grid.RenderTransform>
					<VisualStateManager.VisualStateGroups>
						<VisualStateGroup x:Name="OpenStates">
							<VisualStateGroup.Transitions>
								<VisualTransition GeneratedDuration="0"/>
								<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
									<Storyboard>
										<DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
											<DoubleAnimation.EasingFunction>
												<BackEase Amplitude=".3" EasingMode="EaseOut"/>
											</DoubleAnimation.EasingFunction>
										</DoubleAnimation>
										<DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
									</Storyboard>
								</VisualTransition>
							</VisualStateGroup.Transitions>
							<VisualState x:Name="Closed">
								<Storyboard>
									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
								</Storyboard>
							</VisualState>
							<VisualState x:Name="Open">
								<Storyboard>
									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform"/>
									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
								</Storyboard>
							</VisualState>
						</VisualStateGroup>
					</VisualStateManager.VisualStateGroups>
					<Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
					<Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
					<Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
					<Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
					<Border Background="#FFDC000C" CornerRadius="2"/>
					<Border CornerRadius="2">
						<TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" UseLayoutRounding="false"/>
					</Border>
				</Grid>
			</ControlTemplate>

			<Style x:Key="VkCheckBoxStyle" TargetType="CheckBox">
				<Setter Property="Background" Value="#FF448DCA"/>
				<Setter Property="Foreground" Value="#FF000000"/>
				<Setter Property="HorizontalContentAlignment" Value="Left"/>
				<Setter Property="VerticalContentAlignment" Value="Top"/>
				<Setter Property="Padding" Value="4,1,0,0"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="CheckBox">
							<Grid>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="16"/>
									<ColumnDefinition Width="*"/>
								</Grid.ColumnDefinitions>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualStateGroup.Transitions>
											<VisualTransition GeneratedDuration="0">
												<Storyboard>
													<ColorAnimation Duration="0" To="#FF5F83A5" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="CheckIcon" d:IsOptimized="True"/>
												</Storyboard>
											</VisualTransition>
										</VisualStateGroup.Transitions>
										<VisualState x:Name="Normal"/>
										<VisualState x:Name="MouseOver">
											<Storyboard>
												<ColorAnimation Duration="0" To="#FFDAE1E8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="Background" d:IsOptimized="True"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Pressed"/>
										<VisualState x:Name="Disabled">
											<Storyboard>
												<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter"/>
												<DoubleAnimation Duration="0" To="0.55" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualElement"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="CheckStates">
										<VisualState x:Name="Checked">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CheckIcon"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unchecked"/>
										<VisualState x:Name="Indeterminate">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="IndeterminateIcon"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<!--	
																		<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentFocusVisualElement"/>
																	-->
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused"/>
									</VisualStateGroup>
									<VisualStateGroup x:Name="ValidationStates">
										<VisualState x:Name="Valid"/>
										<VisualState x:Name="InvalidUnfocused"/>
										<VisualState x:Name="InvalidFocused"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Grid HorizontalAlignment="Left" VerticalAlignment="Top">
									<Rectangle x:Name="Background" Height="14" Margin="1" StrokeThickness="{TemplateBinding BorderThickness}" Width="14" Stroke="#FFC0CAD5" Fill="White"/>
									<Path x:Name="CheckIcon" Data="M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z" FlowDirection="LeftToRight" Height="10" Margin="1,1,0,1.5" Opacity="0" Stretch="Fill" Width="10.5" Fill="Black"/>
									<Rectangle x:Name="IndeterminateIcon" Fill="#FF333333" Height="2" Opacity="0" Width="6" d:IsHidden="True"/>
									<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" Height="14" Opacity="0" RadiusY="1" RadiusX="1" Width="14"/>
									<Rectangle x:Name="ContentFocusVisualElement" Height="16" IsHitTestVisible="false" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#FF6DBDD1" StrokeThickness="1" Width="16"/>
								</Grid>
								<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Color x:Key="BkBlueFill">#FF5F83A5</Color>
			<Color x:Key="BkBlueBorder">#FF345F88</Color>


		</ResourceDictionary>

	</Application.Resources>
</Application>
